<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page import="com.bci.pwtz.controller.AbstractController"%>
<%@page import="com.bci.pwtz.common.util.PwtzUtils"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/user/common.jsp"%>
<%@ page import="com.bci.pwtz.mysql.model.Dypdx"%>
<%@ page import="com.bci.pwtz.mysql.model.Dydlfjx"%>
<%@ page import="com.bci.pwtz.mysql.model.Dyxl"%>
<%@page import="com.bci.pwtz.service.DyxlService"%>
<%@page import="com.bci.pwtz.service.DypdxService"%>
<%@page import="com.bci.pwtz.service.DydlfjxService"%>
<%
	String dyzfid = request.getParameter("deviceid");
	String dyzftype = request.getParameter("devicetype");
	DypdxService dypdxService = (DypdxService)SpringUtil.getBean("dypdxService");
	DydlfjxService dydlfjxService = (DydlfjxService)SpringUtil.getBean("dydlfjxService");
	DyxlService dyxlService = (DyxlService)SpringUtil.getBean("dyxlService");
	Dypdx dypdx = new Dypdx();
	Dydlfjx dydlfjx = new Dydlfjx();
	Dyxl dyxl = new Dyxl();	
	String byqname="";
	String dbyqtype="";
	if("16".equals(dyzftype)){
		dypdx = dypdxService.load(dyzfid);
		if(dypdx != null){
			dyxl = dyxlService.load(dypdx.getLinecode());
			if(dyxl!=null){
			    if(dyxl.getDevicetype()==1){
			        byqname="配电变压器";
			        dbyqtype="pdbyq";
			    }else{
			        byqname="柱上变压器";
			        dbyqtype="zsbyq"; 
			    }
			}
		}
	}else if("17".equals(dyzftype)){
		dydlfjx = dydlfjxService.load(dyzfid);
		if(dydlfjx != null){
			dyxl = dyxlService.load(dydlfjx.getLinecode());
			if(dyxl!=null){
			    if(dyxl.getDevicetype()==1){
			        byqname="配电变压器";
			        dbyqtype="pdbyq";
			    }else{
			        byqname="柱上变压器";
			        dbyqtype="zsbyq"; 
			    }
			}
		}
	}
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>配网数据-低压开关</title>
<link href="<%=basePath %>user/css/style.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath %>user/css/llcss.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="<%=basePath %>js/jquery/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=basePath %>user/js/hd_ll.js"></script>
<script type="text/javascript" src="<%=basePath %>user/js/common.js"></script>
<script type="text/javascript" src="<%=basePath %>user/d/js/dykglist.js"></script>
</head>
<script type="text/javascript">
var dyzfid = "<%=dyzfid%>";
var dyzftype = "<%=dyzftype%>";
</script>
<body bgcolor="white">
	<%@ include file="/user/head.jsp"%>
	<div class="pwsj_cont_box">
	<%@ include file="/user/left.jsp"%>
	<!-- 右侧内容_begin -->
	<%if(dyxl!=null){ %>
	<div class="pwsj_cont_right_box">
		<!-- 变压器_begin -->
		<div class="pwsj_right_byq">
			<div class="pwsj_right_byq_position">
			<a class="position" href="<%=basePath %>user/m/index.jsp">配网数据</a>&gt;
			<a class="position" href="<%=basePath %>user/d/<%=dbyqtype %>list.jsp %>"><%=byqname %></a>&gt;
			<a class="position" href="<%=basePath %>user/d/dyxllist.jsp?deviceid=<%=dyxl.getTransformercode() %>&devicetype=<%=dyxl.getDevicetype() %>">低压线路</a>&gt;
			<%if("16".equals(dyzftype)){ %>
			<a class="position" href="<%=basePath %>user/d/dypdxlist.jsp?deviceid=<%=dyxl.getDeviceid() %>&t=<%=System.currentTimeMillis() %>">低压配电箱</a>
			<%} %>
			<%if("17".equals(dyzftype)){ %>
			<a class="position" href="<%=basePath %>user/d/dydlfjxlist.jsp?deviceid=<%=dyxl.getDeviceid() %>&t=<%=System.currentTimeMillis() %>">低压电缆分接箱</a>
			<%} %>
			<%if("16".equals(dyzftype)){ %>
				<a class="right" href="<%=basePath %>user/d/dypdxlist.jsp?deviceid=<%=dyxl.getDeviceid()%>&t=<%=System.currentTimeMillis() %>">返回</a>
			<%}else{ %>
				<a class="right" href="<%=basePath %>user/d/dydlfjxlist.jsp?deviceid=<%=dyxl.getDeviceid()%>&t=<%=System.currentTimeMillis() %>">返回</a>
			<%} %>
		</div>
			<!-- 变压器列表查询条件_begin -->
			<form action="" method="" type="" class="pwsj_byq_choose_form">
				<div class="pwsj_byq_choose">
					<div class='left'>
					<jsp:include page="/user/d/inc/dylevel4_2.jsp" flush="true" > 
			             <jsp:param name="selecttype" value="1" />
					</jsp:include>
						<%if(lowaddaction||isSuper) {%>
							<a href="<%=basePath%>user/d/dykgadd.jsp?deviceid=<%=dyzfid%>&devicetype=<%=PwtzUtils.passInt(dyzftype)%>">添加</a>
						<%}%>
					</div>
					<div class='right'>
						<input type="text" id="deviceName" name="devicename" maxlength="100" class="keywords" placeholder="请输入关键字搜索" />
						<input class="submit" type="button" onclick="goToPage(1)" value="搜索" />
					</div>
					<div class="clear"></div>
				</div>
			</form>
			<!-- 变压器列表查询条件_end -->

			<!-- 变压器列表查询结果_begin -->
			<div class="pwsj_right_byq_cont_title">
				<!-- 标题_begin -->
				<ul class="byq_title_ul">
					<li style="width:4%;"><input type="checkbox" class="checkbox" onclick="selectAll()"/></li>
					<li style="width:20%;">设备名称</li>
					<li style="width:20%;">所属线路名称</li>
					<li style="width:18%;">所属站房名称</li>
					<!-- <li style="width:10%;">投运日期</li> -->
					<li style="width:6%;">开合状态</li>
					<li style="width:12%;">型号</li>
					<!-- <li style="width:6%;">额定电压</li> -->
					<li style="width:6%;">额定电流</li>
					<li style="width:14%;">操作</li>
				</ul>
				<!-- 标题_end -->
				<!-- 结果_begin -->
				<div class="pwsj_right_byq_divbox">
				</div>				
				<!-- 结果_end -->
			</div>
			<!-- 变压器列表查询结果_end -->

			<!-- 分页列表_begin -->
			<div class="page_list_box">
				<!-- 左侧按钮_begin -->
				<div class="page_list_box_left">
				<%if(loweditaction||isSuper){ %>
						<a class="dels_btn" onclick="gobatchupdate(<%=AbstractController.低压开关 %>,this)">批量修改</a>
					<%}
					if(lowdeleteaction||isSuper){
					%>
					<input class="dels_btn" onclick="batchdevicedel('dykg');" type="button" value="批量删除" />
					<%} %>
				</div>
				<!-- 左侧按钮_end -->
				<!-- 右侧分页_begin -->
				<div class="page_list_box_right">
					<div class="page">
			            <a >首页</a>
			            <a >上一页</a>
			            <a class="intro" >1</a>
			            <a >下一页</a>
			            <a >末页</a>
	    			</div>
				</div>
				<!-- 右侧分页_end -->
				<div class="clear"></div><!-- 清除左右浮动 -->
			</div>
			<!-- 分页列表_end -->
		</div>	
		<!-- 变压器_end -->
	</div>
	<!-- 右侧内容_end -->
	<%} %>
	<div class="clear"></div><!-- 清除左右浮动 -->

	</div>
	<!--main end-->
<%@ include file="/user/foot.jsp"%>
</body>
</html>